DECLARE @DateFrom Date

DECLARE @DateTo Date

SET @DateFrom = '2008-01-01'

SET @DateTo = '2015-06-30'

SELECT TOP 10  

      COUNT(Name) AS ExecutionCount

    , Name

    , SUM(TimeDataRetrieval) AS TimeDataRetrievalSum

    , SUM(TimeProcessing) AS TimeProcessingSum

    , SUM(TimeRendering) AS TimeRenderingSum

    , SUM(ByteCount) AS ByteCountSum

    , SUM([RowCount]) AS RowCountSum

FROM

(

    SELECT TimeStart, Catalog.Type, Catalog.Name,

      TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount]

    FROM

    Catalog INNER JOIN ExecutionLog ON Catalog.ItemID = ExecutionLog.ReportID

     WHERE ExecutionLog.TimeStart BETWEEN @DateFrom AND @DateTo AND Type = 2

) AS RE

GROUP BY

        Name

ORDER BY

        COUNT(Name) DESC

      , Name